package eerbaar.internal.elements.extension;

import eerbaar.elements.extension.IPoints;
import eerbaar.extension.IExtensible;

public class PointsImpl implements IPoints, IExtensible {

    private int points;
    private final IExtensible parent;

    public PointsImpl(IExtensible parent) {
        this.parent = parent;
    }

    @Override
    public IExtensible copy() {
        return new PointsImpl(this.parent);
    }

    @Override
    public <T extends IExtensible> T getExtension(Class<T> type) {
        return parent.getExtension(type);
    }

    @Override
    public int getPoints() {
        return points;
    }

    @Override
    public void setPoints(int points) {
        this.points = points;
    }

}
